package com.demo.boss.common.convert;

import com.demo.boss.entity.UserPayConfig;
import com.demo.boss.entity.UserPayInfo;
import com.demo.boss.models.vo.UserPayConfigVo;
import com.demo.boss.models.vo.UserPayInfoVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.MappingConstants;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = MappingConstants.ComponentModel.SPRING,uses = {MapperHelper.class})
public interface UserPayConfigConvert {
    @Mappings({
            @Mapping(source = "editTime",target = "editTime",dateFormat = "yyyy-MM-dd HH:mm"),
            @Mapping(source = "autoSett",target = "autoSett",qualifiedByName = "translateAutoSett")
    })
    UserPayConfigVo mapUserPayConfig(UserPayConfig userPayConfig);
    List<UserPayConfigVo> mapUserPayConfigList(List<UserPayConfig> userPayConfigs);
    List<UserPayInfoVo> mapUserPayInfo(List<UserPayInfo> userPayInfos);
}
